#include "include/compiler.h"
#include "include/usb.h"
#include "include/bunner.h"
#include <iostream>
#include <string>
/*
    "code.bin";
    "header:128bytes";
    "code:500bytes";
    "customOsc:128bytes";
*/
void Bunner::writeCustomOsc(char* binFile)
{
    FILE file = fopen(binFile,"read");
    
    if(sizeof(file) > 128)
    {
        std::cout << "code too long" << std::endl;
    }
    else{
    // 直接通过usb写入电子琴的自定义osc芯片（代码段）（指定偏移，固定大小）;
        Usb usb;
        usb.write("code.bin", "/usb/code.bin");
    }
}